🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / feature / intro / src / androidMain / kotlin / org / meshtastic / feature / intro / NotificationsScreen.kt
Displaying Raw • Download
feature/intro/src/androidMain/kotlin/org/meshtastic/feature/intro/NotificationsScreen.kt feat/batch-nodeinfos (a74d5d47) Text, 4.16 KB
T8b949e/*
* Copyright (c) 2025-2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.feature.intro
Tff7b72import T7ee787android.content.Intent
Tff7b72import T7ee787android.net.Uri
Tff7b72import T7ee787android.provider.Settings
Tff7b72import T7ee787androidx.compose.material.icons.Icons
Tff7b72import T7ee787androidx.compose.material.icons.automirrored.outlined.Message
Tff7b72import T7ee787androidx.compose.material.icons.outlined.BatteryAlert
Tff7b72import T7ee787androidx.compose.material.icons.outlined.SpeakerPhone
Tff7b72import T7ee787androidx.compose.runtime.Composable
Tff7b72import T7ee787androidx.compose.runtime.remember
Tff7b72import T7ee787androidx.compose.ui.platform.LocalContext
Tff7b72import T7ee787org.meshtastic.core.resources.Res
Tff7b72import T7ee787org.meshtastic.core.resources.app_notifications
Tff7b72import T7ee787org.meshtastic.core.resources.configure_notification_permissions
Tff7b72import T7ee787org.meshtastic.core.resources.incoming_messages
Tff7b72import T7ee787org.meshtastic.core.resources.low_battery
Tff7b72import T7ee787org.meshtastic.core.resources.new_nodes
Tff7b72import T7ee787org.meshtastic.core.resources.next
Tff7b72import T7ee787org.meshtastic.core.resources.notification_permissions_description
Tff7b72import T7ee787org.meshtastic.core.resources.notifications_for_channel_and_direct_messages
Tff7b72import T7ee787org.meshtastic.core.resources.notifications_for_low_battery_alerts
Tff7b72import T7ee787org.meshtastic.core.resources.notifications_for_newly_discovered_nodes
Tff7b72import T7ee787org.meshtastic.core.resources.settings
T8b949e/**
* Screen for configuring notification permissions during the app introduction. It explains why notification permissions
* are needed and provides options to grant them or skip.
*
* @param showNextButton Indicates whether to show a "Next" button (if permissions are already granted) or a "Configure"
* button.
* @param onSkip Callback invoked if the user chooses to skip notification permission setup.
* @param onConfigure Callback invoked when the user proceeds to configure or grant permissions.
*/
Tf0883e@Composable
Tff7b72internal Tff7b72fun Td2a8ffNotificationsScreenTb4b4b4(Te6edf3showNextButtonTb4b4b4: Tffa657BooleanTb4b4b4, Te6edf3onSkipTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4, Te6edf3onConfigureTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4) Tb4b4b4{
Tff7b72val Te6edf3context Tff7b72= Te6edf3LocalContextTb4b4b4.Te6edf3current
Tff7b72val Te6edf3annotatedString Tff7b72=
Te6edf3contextTb4b4b4.Te6edf3createClickableAnnotatedStringTb4b4b4(
Te6edf3fullTextRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3notification_permissions_descriptionTb4b4b4,
Te6edf3linkTextRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3settingsTb4b4b4,
Te6edf3tag Tff7b72= Te6edf3SETTINGS_TAGTb4b4b4,
Tb4b4b4)
Tff7b72val Te6edf3features Tff7b72= Te6edf3remember Tb4b4b4{
Te6edf3listOfTb4b4b4(
Te6edf3FeatureUIDataTb4b4b4(
Te6edf3icon Tff7b72= Te6edf3IconsTb4b4b4.Te6edf3AutoMirroredTb4b4b4.Te6edf3OutlinedTb4b4b4.Te6edf3MessageTb4b4b4,
Te6edf3titleRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3incoming_messagesTb4b4b4,
Te6edf3subtitleRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3notifications_for_channel_and_direct_messagesTb4b4b4,
Tb4b4b4)Tb4b4b4,
Te6edf3FeatureUIDataTb4b4b4(
Te6edf3icon Tff7b72= Te6edf3IconsTb4b4b4.Te6edf3OutlinedTb4b4b4.Te6edf3SpeakerPhoneTb4b4b4,
Te6edf3titleRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3new_nodesTb4b4b4,
Te6edf3subtitleRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3notifications_for_newly_discovered_nodesTb4b4b4,
Tb4b4b4)Tb4b4b4,
Te6edf3FeatureUIDataTb4b4b4(
Te6edf3icon Tff7b72= Te6edf3IconsTb4b4b4.Te6edf3OutlinedTb4b4b4.Te6edf3BatteryAlertTb4b4b4,
Te6edf3titleRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3low_batteryTb4b4b4,
Te6edf3subtitleRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3notifications_for_low_battery_alertsTb4b4b4,
Tb4b4b4)Tb4b4b4,
Tb4b4b4)
Tb4b4b4}
Te6edf3PermissionScreenLayoutTb4b4b4(
Te6edf3headlineRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3app_notificationsTb4b4b4,
Te6edf3annotatedDescription Tff7b72= Te6edf3annotatedStringTb4b4b4,
Te6edf3features Tff7b72= Te6edf3featuresTb4b4b4,
Te6edf3onSkip Tff7b72= Te6edf3onSkipTb4b4b4,
Te6edf3onConfigure Tff7b72= Te6edf3onConfigureTb4b4b4,
Te6edf3configureButtonTextRes Tff7b72= Tff7b72if Tb4b4b4(Te6edf3showNextButtonTb4b4b4) Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3next Tff7b72else Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3configure_notification_permissionsTb4b4b4,
Te6edf3onAnnotationClick Tff7b72= Tb4b4b4{
Tff7b72val Te6edf3intent Tff7b72= Te6edf3IntentTb4b4b4(Te6edf3SettingsTb4b4b4.Te6edf3ACTION_APPLICATION_DETAILS_SETTINGSTb4b4b4)
Te6edf3intentTb4b4b4.Te6edf3data Tff7b72= Te6edf3UriTb4b4b4.Te6edf3fromPartsTb4b4b4(Ta5d6ff"Ta5d6ffpackageTa5d6ff"Tb4b4b4, Te6edf3contextTb4b4b4.Te6edf3packageNameTb4b4b4, Tff7b72nullTb4b4b4)
Te6edf3contextTb4b4b4.Te6edf3startActivityTb4b4b4(Te6edf3intentTb4b4b4)
Tb4b4b4}Tb4b4b4,
Tb4b4b4)
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.05s